<?php defined('SYSPATH') OR die('No direct script access.');

class DB extends Kohana_DB {

	public static function begin($db = NULL)
	{
		if ( ! is_object($db))
		{
			// Get the database instance
			$db = Database::instance($db);
		}

		return $db->begin();
	}
	public static function commit($db = NULL)
	{
		if ( ! is_object($db))
		{
			// Get the database instance
			$db = Database::instance($db);
		}

		return $db->commit();
	}
	public static function rollback($db = NULL)
	{
		if ( ! is_object($db))
		{
			// Get the database instance
			$db = Database::instance($db);
		}

		return $db->rollback();
	}
}
